package com.njlime.cms.controller.app;

import com.njlime.cms.service.app.AppChannelService;
import com.njlime.cms.service.app.AppMaterialNewsService;
import com.njlime.core.base.controller.BaseAppController;
import com.njlime.core.web.AppWxInterceptor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * Created by Dean on 2017-10-16.
 */
@Controller
@RequestMapping(value = "/app/material")
public class AppMaterialController extends BaseAppController{
    @Resource
    private AppMaterialNewsService appMaterialNewsService;

    /**
     * 栏目列表
     * @param request
     * @param id
     * @return
     */
    @RequestMapping(value = "/detail", method = RequestMethod.GET)
    @ResponseBody
    public String columnList(HttpServletRequest request, Integer id) {
        return toJsonSuccessData(appMaterialNewsService.get(id));
    }
}
